import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import { useUserStore } from '@/store/user'
import 'element-plus/dist/index.css'

const app = createApp(App)
const pinia = createPinia()
app.use(pinia)
app.use(router)

// 初始化userStore，保证后续组件能拿到userStore.user.id
const userStore = useUserStore()
userStore.initFromStorage()

app.mount('#app')
